﻿using Microsoft.Graphics.Canvas.Effects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Documents;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using 纸片人.ConvertClass;
using 纸片人.win2dEffectControl.DataClass;

// The Templated Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234235

namespace 纸片人.win2dEffectControl
{
    public sealed class HueToRgbEffectControl : EffectControl
    {

        ComboBox sourceColorSpaceComboBox;

        public override EffectOneSourceData OneEffetData { get; set; }

        List<EffectHueColorSpace> listEffectHueColorSpace = new List<EffectHueColorSpace>();
        public HueToRgbEffectControl()
        {
            this.DefaultStyleKey = typeof(HueToRgbEffectControl);
            listEffectHueColorSpace =EffectUtil.GetEnumList<EffectHueColorSpace>(); 
            OneEffetData = new HueToRgbEffectData();

        }

        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            SetEffectName("Hsv转换成Rgb彩色空间", "HueToRgbEffect");

            sourceColorSpaceComboBox = GetTemplateChildFormName<ComboBox>(nameof(sourceColorSpaceComboBox));
            SetComboBox(sourceColorSpaceComboBox, listEffectHueColorSpace, OneEffetData, nameof(HueToRgbEffectData.SourceColorSpace));

           
        }
    }
}
